package com.jiyun.racelist.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jiyun.model.Race;
import com.jiyun.racelist.mapper.RaceMapper;
import com.jiyun.racelist.service.RaceService;
import com.jiyun.vo.RaceVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RaceServiceImpl extends ServiceImpl<RaceMapper, Race> implements RaceService {

    @Autowired
    RaceMapper raceMapper;

    @Override
    public Page<RaceVo> findPage(Integer pageNum, Integer pageSize, RaceVo raceVo) {
        Page<RaceVo> raceVoPage = new Page<>(pageNum, pageSize);
        raceMapper.findPage(raceVoPage,raceVo);
        return raceVoPage;
    }

    @Override
    public List<RaceVo> baoming(Integer id) {
        return raceMapper.baoming(id);
    }

    @Override
    public List<RaceVo> BeginJingSai(Integer id) {
        return raceMapper.BeginJingSai(id);
    }
}
